From: Georges Basile Stavracas Neto Date: Tue, 29 Dec 2020 21:51:40 +0000 (-0300) Subject: viewSelector: Tie workspace fit mode to adjustment X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~616^2^2~484 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=1359b272a4f9db85a93160b3fe058cfcb7493b85;p=gnome-shell.git viewSelector: Tie workspace fit mode to adjustment Tie the fit mode adjustment of WorkspacesDisplay to the state adjustment of AppPagesContainer, and transition to the ALL fit mode when the app grid is visible. Part-of: --- diff --git a/js/ui/viewSelector.js b/js/ui/viewSelector.js index 72f068aa4..b12061889 100644 --- a/js/ui/viewSelector.js +++ b/js/ui/viewSelector.js @@ -181,6 +181,12 @@ class ActivitiesContainer extends St.Widget { opacity: Util.lerp(0, 255, 1 - progress), visible: (1 - progress) !== 0, }); + + const { fitModeAdjustment } = this._workspacesDisplay; + fitModeAdjustment.value = Util.lerp( + WorkspacesView.FitMode.SINGLE, + WorkspacesView.FitMode.ALL, + progress); } _getWorkspacesBoxes(box, thumbnailsHeight) { diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js index 3f3cc3edb..93782f431 100644 --- a/js/ui/workspacesView.js +++ b/js/ui/workspacesView.js @@ -967,4 +967,8 @@ class WorkspacesDisplay extends St.Widget { Main.wm.actionMoveWorkspace(ws); return Clutter.EVENT_STOP; } + + get fitModeAdjustment() { + return this._fitModeAdjustment; + } });